<template>
  <div class="td-doctor-me-setting">
    <mt-header fixed title="设置">
      <router-link to="tdDoctorMe" slot="left">
        <mt-button icon="back"></mt-button>
      </router-link>
    </mt-header>

    <div class="setting-menus">
      <mt-cell title="修改密码" is-link @click.native="$router.push({name:'tdDoctorMeModifyPassword'})">
        <img
          slot="icon"
          src="../../../../assets/images/doctor/me-xiugaimima.png"
          width="24"
          height="24"
        >
      </mt-cell>
    </div>
    <el-button type="primary" class="btnSignOut" @click.native="btnSignOut();" size="mini">
      <i class="icon font_family icon-td-dengchutuichuguanbi"></i>&nbsp;退出系统
    </el-button>
  </div>
</template>

<script>
export default {
  name: "TianDingDoctorMeSettingComponent",
  mounted() {},
  methods: {
    btnSignOut() {
      this.cookies$.remove("tdCookie");
      Object.keys(window.localStorage).forEach(storage => {
        if (storage !== "tdUser" || storage !== "tdType") {
          this.local$.removeItem(storage);
        }
      });
      window.location.href = "/";
    }
  }
};
</script>

